//
//  SNClickEffView.m
//  project
//
//  Created by 黄建华 on 2018/11/5.
//  Copyright © 2018年 黄建华. All rights reserved.
//

#import "SNClickEffView.h"

@implementation SNClickEffView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView
{
    self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.10];
    
    _view1 = [[UIView alloc] init];
    _view1.frame = CGRectMake(0, 0, 1, self.height);
    _view1.alpha = 0.15;
    _view1.backgroundColor = [UIColor blackColor];
    [self addSubview:_view1];
}

- (void)tapView
{
    _view1.frame = CGRectMake(0, 0, 1, self.height);
    [UIView animateWithDuration:0.25 animations:^{
    _view1.frame = CGRectMake(0, 0,self.width, self.height);
    } completion:^(BOOL finished) {
    _view1.frame = CGRectMake(0, 0, 0, 0);
    }];
}

@end
